{template 'common/header'}
<style>
	.hf_acv:hover {
		text-decoration: underline;
	}

	.dropdown-menu {
		text-align: left;
		min-width: 84px;
		left: -20px;
	}
</style>

<script>

	function dian() {

		console.log(window);
		var value = document.getElementsByClassName('ssk');

		var url = document.location.protocol + '//' + document.location.hostname + document.location.pathname + '?c=site&a=entry&do=meslist&m=ciyt_ms&key=' + encodeURIComponent(value[0]['value']);

		document.location.href = url;
	}

	document.getElementsByTagName('table').onclick = function() {console.log('1111')};
</script>

<form role="form" action="{php echo $this->createWebUrl('Meslist')}" method="POST" style="margin-bottom:10px;overflow:hidden;" onsubmit="tcgjz(this);">
	<div class="col-lg-6" style="padding-left:0;">
		<div class="input-group">
			<input type="text" class="form-control ssk" name="gjz" placeholder="姓名/联系电话/Email/留言内容 " value="{$gjz}">
			<span class="input-group-btn">
				<input class="btn btn-default" type="button" value="查找" onclick="dian();">
			</span>
		</div>
	</div>
</form>


<table class="table table-striped" style="font-size:inherit;">
	<thead>
	<tr>
		<th>
			<li class="dropdown all-camera-dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#">
					序号
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li data-filter-camera-type="xh1">
						<a href="{php echo $this->createWebUrl('meslist');}&xh=1">正序</a>
					</li>
					<li data-filter-camera-type="xh2">
						<a href="{php echo $this->createWebUrl('meslist');}">倒序</a>
					</li>
				</ul>
			</li>
		</th>
		<th>姓名</th>
		<th>联系电话</th>
		<th>Email</th>
		<th>留言内容</th>
		<th>
			<li class="dropdown all-camera-dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#">
					{php echo $tm;}
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li data-filter-camera-type="tm0">
						<a href="{php echo $this->createWebUrl('meslist');}">所有</a>
					</li>
					<li data-filter-camera-type="tm1">
						<a href="{php echo $this->createWebUrl('meslist');}&tm=1">今天</a>
					</li>
					<li data-filter-camera-type="tm2">
						<a href="{php echo $this->createWebUrl('meslist');}&tm=2">昨天</a>
					</li>
					<li data-filter-camera-type="tm3">
						<a href="{php echo $this->createWebUrl('meslist');}&tm=3">近七天</a>
					</li>
					<li data-filter-camera-type="tm4">
						<a href="{php echo $this->createWebUrl('meslist');}&tm=4">本月</a>
					</li>
				</ul>
			</li>
		</th>
		<th>			
			<li class="dropdown all-camera-dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#">
					{php echo $zt;}
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li data-filter-camera-type="all">
						<a href="{php echo $this->createWebUrl('meslist');}">所有</a>
					</li>
					<li data-filter-camera-type="Alpha">
						<a href="{php echo $this->createWebUrl('meslist');}&zt=no">未处理</a>
					</li>
					<li data-filter-camera-type="Zed">
						<a href="{php echo $this->createWebUrl('meslist');}&zt=yes">已处理</a>
					</li>
				</ul>
			</li>
		</th>
	</tr>
	</thead>
	<tbody>
		
		{loop $mesPageList $index $item}
		<tr>
			<td>{$item['index']}</td>
			<td>{$item['name']}</td>
			<td style="width:130px;">{$item['number']}</td>
			<td>{$item['email']}</td>
			<td style="width:270px;">{$item['content']}</td>
			<td style="width:115px;">{$item['time']}</td>
				{if $item['status'] == 1}
					<td style="width:74px;">
					已处理
					</td>
				{else}
					<td class="hf_acv" style="width:74px;color:#c10000;cursor:pointer;" title="设为已处理" data-toggle="modal" data-target=".fade{$item['index']}" data-key="{$item['index']}">
					回复
					</td>	
				{/if}
		</tr>

		
		<!-- Modal -->
		<div class="modal fade{$item['index']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document" style="min-width:600px;font-size:18px;text-align:center;">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="myModalLabel">提示</h4>
					</div>
					<div class="modal-body">
						是否将此留言状态设置为：已处理
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<a href="{php echo $this->createWebUrl('meslist');}&status=y&index={$item['index']}" type="button" class="btn btn-primary">确定</a>
					</div>
				</div>
			</div>
		</div>
		{/loop}
		
	</tbody>
</table>



	
{$pager}

{template 'common/footer'}